Skip to content

feat: add wan2.2_t2v model and quantization config#454

Merged
gushiqiao merged 19 commits intoModelTC:mainfrom
Charles2530:feat/wan2.2-t2v
Apr 1, 2026
Merged

feat: add wan2.2_t2v model and quantization config#454
gushiqiao merged 19 commits intoModelTC:mainfrom
Charles2530:feat/wan2.2-t2v

Conversation

@Charles2530
Copy link
Copy Markdown
Contributor

@Charles2530 Charles2530 commented Mar 10, 2026

Add wan2.2_t2v model and quant configuration, corresponding config and script changes

Charles2530 and others added 11 commits March 10, 2026 10:57
Add a small test script to load sharded safetensors from a Hugging Face repo/local dir and print parameter keys with shapes.

Made-with: Cursor
…sformer experts

Add support for skipping quantization on specified transformer blocks
(block_ids: [0, 40] → block 0 of transformer and transformer_2) to
improve quality of the two highest-impact blocks.

Changes:
- base_blockwise_quantization.py: add _get_ignored_block_ids_set and
  _is_ignored_block helpers; modify set_no_quant_layer to skip all
  linear layers when layer_names is empty; modify run to skip
  block_transform for ignored blocks so AWQ scales are not applied
- configs/…/awq_w_a_skip_first.yaml: new config with ignored_layers
  block_ids [0, 40] and separate save_path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor Author

@Charles2530 Charles2530 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solve problem above in comments

@gushiqiao
Copy link
Copy Markdown
Contributor

可以解一下合并冲突,然后就可以merge了

@Charles2530
Copy link
Copy Markdown
Contributor Author

你好,已经解决冲突了

Copy link
Copy Markdown

@JiwaniZakir JiwaniZakir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to wan_i2v/awq_w_a.yaml, wan_t2v/awq_w_a.yaml, wan_t2v/rtn_w_a.yaml, and wan_t2v/smoothquant_w_a.yaml are purely removing trailing newlines (introducing \ No newline at end of file), which is a regression in the existing files unrelated to the stated goal of this PR and goes against POSIX file conventions.

The new wan2_2_t2v/awq_w_a.yaml uses type: Wan2T2V, whereas the existing wan_t2v configs use type: WanT2V — the diff doesn't include any code registering or implementing the Wan2T2V model class, so it's unclear whether this will resolve correctly at runtime or silently fall back to an incorrect handler.

The newly added docs/wan2.1_quantization_guide.md documents Wan2.1 models (WanI2V, WanT2V) exclusively, but this PR introduces Wan2.2 support (wan2_2_t2v). The guide should either be updated to cover Wan2.2 specifics (notably guidance_scale_2, which appears only in the new config) or a separate doc should be added, since guidance_scale_2: 3.0 in the calib/eval sections is a new parameter with no explanation anywhere in the documentation.

The wan2_2_t2v directory only ships an AWQ config, whereas the existing wan_t2v directory also provides RTN and SmoothQuant variants. If those methods are also supported for Wan2.2, the missing configs should be included for consistency; if not, a comment explaining the omission would be helpful.

@gushiqiao gushiqiao merged commit 9701d03 into ModelTC:main Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants